<!DOCTYPE html>
<html>
<title>W3.CSS 模板</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.cn/w3css/4/w3.css">
<link rel="stylesheet" href="https://www.w3schools.cn/lib/w3-theme-black.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
<body>

<!-- Side Navigation -->
<nav class="w3-sidebar w3-bar-block w3-card w3-animate-left w3-center" style="display:none" id="mySidebar">
    <h1 class="w3-xxxlarge w3-text-theme">侧面导航</h1>
    <button class="w3-bar-item w3-button" onclick="w3_close()">Close <i class="fa fa-remove"></i></button>
    <a href="#" class="w3-bar-item w3-button">链接 1</a>
    <a href="#" class="w3-bar-item w3-button">链接 2</a>
    <a href="#" class="w3-bar-item w3-button">链接 3</a>
    <a href="#" class="w3-bar-item w3-button">链接 4</a>
</nav>

<!-- Header -->
<header class="w3-container w3-theme w3-padding" id="myHeader">
    <i onclick="w3_open()" class="fa fa-bars w3-xlarge w3-button w3-theme"></i>
    <div class="w3-center">
        <h4>漂亮的响应式网站</h4>
        <h1 class="w3-xxxlarge w3-animate-bottom">使用 W3.CSS 构建</h1>
        <div class="w3-padding-32">
            <button class="w3-btn w3-xlarge w3-dark-grey w3-hover-light-grey" onclick="document.getElementById('id01').style.display='block'" style="font-weight :900;">学习 W3.CSS</button>
        </div>
    </div>
</header>

<!-- 模态 -->
<div id="id01" class="w3-modal">
    <div class="w3-modal-content w3-card-4 w3-animate-top">
        <header class="w3-container w3-theme-l1">
        <span onclick="document.getElementById('id01').style.display='none'"
              class="w3-button w3-display-topright">×</span>
            <h4>我们刚刚向您展示了一个模式..</h4>
            <h5>因为我们可以<i class="fa fa-smile-o"></i></h5>
            </header>
            <div class="w3-padding">
                <p>很酷吧？ 好吧，观察到了..</p>
                <p>转到我们的 <a class="w3-btn" href="/w3css/default.asp">W3.CSS 教程</a> 了解更多信息！</p>
            </div>
            <footer class="w3-container w3-theme-l1">
                <p>模态页脚</p>
            </footer>
    </div>
</div>

<div class="w3-row-padding w3-center w3-margin-top">
    <div class="w3-third">
        <div class="w3-card w3-container" style="min-height:460px">
            <h3>Responsive</h3><br>
            <i class="fa fa-desktop w3-margin-bottom w3-text-theme" style="font-size:120px"></i>
            <p>Built-in responsiveness</p>
            <p>移动优先的流体网格</p>
            <p>Fits any screen sizes</p>
            <p>PC Tablet and Mobile</p>
        </div>
    </div>

    <div class="w3-third">
        <div class="w3-card w3-container" style="min-height:460px">
            <h3>Standard CSS</h3><br>
            <i class="fa fa-css3 w3-margin-bottom w3-text-theme" style="font-size:120px"></i>
            <p>Standard CSS only</p>
            <p>Easy to learn</p>
            <p>No need for jQuery</p>
            <p>No JavaScript library</p>
        </div>
    </div>

    <div class="w3-third">
        <div class="w3-card w3-container" style="min-height:460px">
            <h3>Design</h3><br>
            <i class="fa fa-diamond w3-margin-bottom w3-text-theme" style="font-size:120px"></i>
            <p>Paper like design</p>
            <p>Bold colors and shadows</p>
            <p>Equal across platforms</p>
            <p>Equal across devices</p>
        </div>
    </div>
</div>

<div class="w3-container">
    <hr>
    <div class="w3-center">
        <h2>Color Classes</h2>
    </div>

    <div class="w3-row">
        <div class="w3-col w3-container m2 w3-red"><p>红色</p></div>
        <div class="w3-col w3-container m2 w3-blue"><p>蓝色</p></div>
        <div class="w3-col w3-container m2 w3-blue-grey"><p>Blue Grey</p></div>
        <div class="w3-col w3-container m2 w3-teal"><p>teal</p></div>
        <div class="w3-col w3-container m2 w3-yellow"><p>Yellow</p></div>
        <div class="w3-col w3-container m2 w3-orange"><p>Orange</p></div>
    </div>

    <hr>
    <div class="w3-center">
        <h2>Built-In Responsiveness</h2>
        <p class="w3-large">Resize the page to see the effect!</p>
    </div>
    <br>

    <div class="w3-row w3-border">
        <div class="w3-half w3-container w3-blue w3-border">
            <h5>w3-half</h5>
            <p>The w3-half class uses half (50%) of the screen window.</p>
            <p>On small screens (max 600 pixels) it automatically resizes to full screen width.</p>
        </div>
        <div class="w3-half w3-container">
            <h5>w3-half</h5>
        </div>
    </div>
    <br>

    <div class="w3-row w3-border">
        <div class="w3-third w3-container w3-green">
            <h5>w3-third</h5>
            <p>The w3-third class uses one third (33.33%) of the screen widow.</p>
            <p>On small screens (max 600 pixels) it automatically resizes to full screen width.</p>
        </div>
        <div class="w3-third w3-container">
            <h5>w3-third</h5>
        </div>
        <div class="w3-third w3-container">
            <h5>w3-third</h5>
        </div>
    </div>
    <br>

    <div class="w3-row w3-border">
        <div class="w3-quarter w3-container w3-red">
            <h5>w3-quarter</h5>
            <p>The w3-quarter class uses one quarter (25%) of the screen window.</p>
            <p>On small screens (max 600 pixels) it automatically resizes to full screen width.</p>
        </div>
        <div class="w3-quarter w3-container">
            <h5>w3-quarter</h5>
        </div>
        <div class="w3-quarter w3-container">
            <h5>w3-quarter</h5>
        </div>
        <div class="w3-quarter w3-container">
            <h5>w3-quarter</h5>
        </div>
    </div>

    <div class="w3-center">
        <h2>Containers</h2>
        <p>Use containers to create headers, sections and footers.</p>
    </div>

    <header class="w3-container w3-blue-grey">
        <h2>页眉</h2>
    </header>

    <div class="w3-padding w3-white w3-display-container">
        <span onclick="this.parentElement.style.display='none'" class="w3-button w3-display-topright"><i class="fa fa-remove"></i></span>
        <h2>伦敦</h2>
        <p>伦敦是英格兰的首都。它是英国人口最多的城市，
            拥有超过 1300 万居民的大都市区。</p>
        <p>Standing on the River Thames, London has been a major settlement for two millennia,
            its history going back to its founding by the Romans, who named it Londinium.</p>
        <p>By the way, you can add a close icon to all containers if you want the ability to hide them. Look to your right!</p>
    </div>

    <footer class="w3-container w3-blue-grey">
        <h5>页脚</h5>
        <p class="w3-opacity">页脚信息在这里</p>
    </footer>

    <hr>
    <div class="w3-center">
        <h2>Color Themes</h2>
        <p>The color themes have been designed to work harmoniously with each other.</p>
    </div>
</div>

<div class="w3-row-padding">

    <div class="w3-half">
        <div class="w3-card white">
            <div class="w3-container w3-indigo">
                <h3>Theme Indigo</h3>
            </div>
            <div class="w3-container">
                <h3 class="w3-text-indigo">电影 2014</h3>
            </div>
            <ul class="w3-ul w3-border-top">
                <li>
                    <h3>Frozen</h3>
                    <p>The response to the animations was ridiculous</p>
                </li>
                <li>
                    <h3>The Fault in Our Stars</h3>
                    <p>Touching, gripping and genuinely well made</p>
                </li>
                <li>
                    <h3>The Avengers</h3>
                    <p>A huge success for Marvel and Disney</p>
                </li>
            </ul>
            <div class="w3-container w3-indigo w3-large"><span class="w3-right">Next</span></div>
        </div>
    </div>

    <div class="w3-half">
        <div class="w3-card white">
            <div class="w3-container w3-theme">
                <h3>Theme</h3>
            </div>
            <div class="w3-container">
                <h3 class="w3-text-theme">电影 2014</h3>
            </div>
            <ul class="w3-ul w3-border-top">
                <li>
                    <h3>Frozen</h3>
                    <p>The response to the animations was ridiculous</p>
                </li>
                <li>
                    <h3>The Fault in Our Stars</h3>
                    <p>Touching, gripping and genuinely well made</p>
                </li>
                <li>
                    <h3>The Avengers</h3>
                    <p>A huge success for Marvel and Disney</p>
                </li>
            </ul>
            <div class="w3-container w3-theme w3-large"><span class="w3-right">Next</span></div>
        </div>
    </div>
</div>

<div class="w3-container w3-center">
    <hr>
    <h3>Paper-like Cards with Shadows</h3>
</div>

<div class="w3-row-padding">

    <div class="w3-third">
        <div class="w3-card">
            <img src="/w3images/car.jpg" alt="汽车" style="width:100%">
            <div class="w3-container">
                <p>w3-card</p>
            </div>
        </div>
    </div>

    <div class="w3-third">
        <div class="w3-card-4">
            <img src="/w3images/car.jpg" alt="汽车" style="width:100%">
            <div class="w3-container">
                <p>w3-card-4</p>
            </div>
        </div>
    </div>

    <div class="w3-third">
        <div class="w3-card-4">
            <img src="/w3images/car.jpg" alt="汽车" style="width:100%">
            <div class="w3-container">
                <p>w3-card-4</p>
            </div>
        </div>
    </div>
</div>

<div class="w3-container">
    <hr>
    <div class="w3-center">
        <h2>Tables</h2>
        <p w3-class="w3-large">Don't worry. W3.CSS takes care of your tables.</p>
    </div>
    <div class="w3-responsive w3-card-4">
        <table class="w3-table w3-striped w3-bordered">
            <thead>
            <tr class="w3-theme">
                <th>First Name</th>
                <th>Last Name</th>
                <th>Points</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>Jill</td>
                <td>Smith</td>
                <td>50</td>
            </tr>
            <tr class="w3-white">
                <td>Eve</td>
                <td>Jackson</td>
                <td>94</td>
            </tr>
            <tr>
                <td>Adam</td>
                <td>Johnson</td>
                <td>67</td>
            </tr>
            </tbody>
        </table>
    </div>

    <hr>
    <h2 class="w3-center">Forms and Lists</h2>
</div>

<div class="w3-row-padding">

    <div class="w3-half">
        <form class="w3-container w3-card-4">
            <h2>输入表单</h2>
            <div class="w3-section">
                <input class="w3-input" type="text" required>
                <label>Name</label>
            </div>
            <div class="w3-section">
                <input class="w3-input" type="text" required>
                <label>Email</label>
            </div>
            <div class="w3-section">
                <input class="w3-input" type="text" required>
                <label>Subject</label>
            </div>

            <div class="w3-row">
                <div class="w3-half">
                    <input id="milk" class="w3-check" type="checkbox" checked="checked">
                    <label>牛奶</label>
                    <br>
                    <input id="sugar" class="w3-check" type="checkbox">
                    <label>Sugar</label>
                    <br>
                    <input id="lemon" class="w3-check" type="checkbox" disabled>
                    <label>Lemon (Disabled)</label>
                    <br><br>
                </div>

                <div class="w3-half">
                    <input id="male" class="w3-radio" type="radio" name="gender" value="male" checked>
                    <label>Male</label>
                    <br>
                    <input id="female" class="w3-radio" type="radio" name="gender" value="female">
                    <label>Female</label>
                    <br>
                    <input id="unknown" class="w3-radio" type="radio" name="gender" value="" disabled>
                    <label> Don't know (Disabled)</label>
                </div>
            </div>
        </form>
    </div>
    <div class="w3-half">
        <div class="w3-card-4 w3-container">
            <h2>Lists</h2>
            <ul class="w3-ul w3-margin-bottom">
                <li>Jill</li>
                <li>Eve</li>
                <li>Adam</li>
            </ul>
            <br>
            <ul class="w3-ul w3-border w3-hoverable">
                <li class="w3-theme">Jill</li>
                <li>Eve</li>
                <li>Adam</li>
                <li>Steve</li>
            </ul>
            <br>
        </div>
    </div>
</div>
<hr>

<h2 class="w3-center">Progress Bars</h2>
<div class="w3-container">

    <div class="w3-light-gray">
        <div id="myBar" class="w3-center w3-padding w3-theme" style="width:5%">5%</div>
    </div><br>
    <button class="w3-btn w3-theme" onclick="move()">点击这里</button>
</div>
<hr>

<h2 class="w3-center">Slideshows</h2>
<div class="w3-content" style="max-width:800px;position:relative">

    <img class="mySlides w3-animate-opacity" src="/w3images/snow.jpg" style="width:100%">
    <img class="mySlides w3-animate-opacity" src="/w3images/lights.jpg" style="width:100%">
    <img class="mySlides w3-animate-opacity" src="/w3images/mountains.jpg" style="width:100%">
    <img class="mySlides w3-animate-opacity" src="/w3images/forest.jpg" style="width:100%">

    <a class="w3-button w3-hover-dark-grey" style="position:absolute;top:45%;left:0;" onclick="plusDivs(-1)">❮</a>
    <a class="w3-button w3-hover-dark-grey" style="position:absolute;top:45%;right:0;" onclick="plusDivs(+1)">❯</a>
</div>

<div class="w3-container">
    <hr>
    <h2 class="w3-center">Navigation</h2>

    <div class="w3-bar w3-theme">
        <a href="#" class="w3-bar-item w3-button w3-padding-16">首页</a>
        <a href="#" class="w3-bar-item w3-button w3-padding-16">链接 1</a>
        <div class="w3-dropdown-hover">
            <button class="w3-button w3-padding-16">
                下拉列表 <i class="fa fa-caret-down"></i>
            </button>
            <div class="w3-dropdown-content w3-card-4 w3-bar-block">
                <a href="javascript:void(0)" class="w3-bar-item w3-button">链接 1</a>
                <a href="javascript:void(0)" class="w3-bar-item w3-button">链接 2</a>
                <a href="javascript:void(0)" class="w3-bar-item w3-button">链接 3</a>
            </div>
        </div>
    </div>

    <hr>
    <h2 class="w3-center">手风琴</h2>
    <button onclick="myAccFunc('Demo1')" class="w3-padding-16 w3-theme w3-button w3-block w3-left-align">打开第 1 节</button>
    <div id="Demo1" class="w3-hide">
        <div class="w3-container">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
        </div>
    </div>
    <button onclick="myAccFunc('Demo2')" class="w3-padding-16 w3-theme w3-button w3-block w3-left-align">打开第 2 节</button>
    <div id="Demo2" class="w3-hide">
        <a href="#" class="w3-button w3-block w3-left-align">链接 1</a>
        <a href="#" class="w3-button w3-block w3-left-align">链接 2</a>
        <a href="#" class="w3-button w3-block w3-left-align">链接 3</a>
    </div>
    <button onclick="myAccFunc('Demo3')" class="w3-padding-16 w3-theme w3-button w3-block w3-left-align">打开第 3 节</button>
    <div id="Demo3" class="w3-hide w3-black">
        <div class="w3-container">
            <p>Accordion with Images:</p>
            <img src="img_snowtops.jpg" style="width:30%;" class="w3-animate-zoom">
            <p>French Alps</p>
        </div>
    </div>

    <hr>
    <h2 class="w3-center">Tabs</h2>
    <div class="w3-border">
        <div class="w3-bar w3-theme">
            <button class="w3-bar-item w3-button testbtn w3-padding-16" onclick="openCity(event,'London')">伦敦</button>
            <button class="w3-bar-item w3-button testbtn w3-padding-16" onclick="openCity(event,'Paris')">巴黎</button>
            <button class="w3-bar-item w3-button testbtn w3-padding-16" onclick="openCity(event,'Tokyo')">东京</button>
        </div>

        <div id="London" class="w3-container city w3-animate-opacity">
            <h2>伦敦</h2>
            <p>伦敦是英格兰的首都。</p>
            <p>它是英国人口最多的城市， 拥有超过 1300 万居民的大都市区。</p>
        </div>

        <div id="巴黎" class="w3-container city w3-animate-opacity">
            <h2>巴黎</h2>
            <p>巴黎是法国的首都。</p>
            <p>巴黎地区是欧洲最大的人口中心之一， 拥有超过 1200 万居民。</p>
        </div>

        <div id="Tokyo" class="w3-container city w3-animate-opacity">
            <h2>东京</h2>
            <p>东京是日本的首都。</p>
            <p>它是东京地区的中心， 以及世界上人口最多的大都市区之一。</p>
        </div>
    </div>

    <hr>
    <h2 class="w3-center">Buttons</h2>
    <div class="w3-center">
        <br>
        <a class="w3-button w3-theme">按钮</a>
        <a class="w3-button w3-theme">按钮</a>
        <a class="w3-button w3-theme-d3 w3-disabled">按钮</a>
        <br><br>
        <a class="w3-button w3-circle w3-large w3-black"><i class="fa fa-plus"></i></a>
        <a class="w3-button w3-circle w3-large w3-theme"><i class="fa fa-plus"></i></a>
        <a class="w3-button w3-circle w3-large w3-card-4"><i class="fa fa-plus"></i></a>
    </div>
    <br>
    <div class="w3-center">
        <div class="w3-dropdown-hover">
            <button class="w3-button w3-theme">下拉列表 <i class="fa fa-caret-down"></i></button>
            <div class="w3-dropdown-content w3-bar-block w3-border">
                <a href="#" class="w3-bar-item w3-button">链接 1</a>
                <a href="#" class="w3-bar-item w3-button">链接 2</a>
                <a href="#" class="w3-bar-item w3-button">链接 3</a>
            </div>
        </div>
    </div>

</div>

<hr>
<div class="w3-center">
    <h2>分页</h2>
    <!-- Pagination -->
    <div class="w3-center w3-padding-32">
        <div class="w3-bar">
            <a href="#" class="w3-bar-item w3-button w3-hover-theme">«</a>
            <a href="#" class="w3-bar-item w3-button w3-theme w3-hover-theme">1</a>
            <a href="#" class="w3-bar-item w3-button w3-hover-theme">2</a>
            <a href="#" class="w3-bar-item w3-button w3-hover-theme">3</a>
            <a href="#" class="w3-bar-item w3-button w3-hover-theme">4</a>
            <a href="#" class="w3-bar-item w3-button w3-hover-theme">5</a>
            <a href="#" class="w3-bar-item w3-button w3-hover-theme">»</a>
        </div>
    </div>
</div>
<br>

<!-- Footer -->
<footer class="w3-container w3-theme-dark w3-padding-16">
    <h3>页脚</h3>
    <p>Powered by <a href="https://www.w3schools.cn/w3css/default.asp" target="_blank">w3.css</a></p>
    <div style="position:relative;bottom:55px;" class="w3-tooltip w3-right">
        <span class="w3-text w3-theme-light w3-padding">回到顶部</span> 
        <a class="w3-text-white" href="#myHeader"><span class="w3-xlarge">
    <i class="fa fa-chevron-circle-up"></i></span></a>
    </div>
    <p>Remember to check out our  <a href="w3css_references.asp" class="w3-btn w3-theme-light" target="_blank">W3.CSS Reference</a></p>
</footer>

<!-- Script for Sidebar, Tabs, Accordions, Progress bars and slideshows -->
<script>
    // Side navigation
    function w3_open() {
        var x = document.getElementById("mySidebar");
        x.style.width = "100%";
        x.style.fontSize = "40px";
        x.style.paddingTop = "10%";
        x.style.display = "block";
    }
    function w3_close() {
        document.getElementById("mySidebar").style.display = "none";
    }

    // Tabs
    function openCity(evt, cityName) {
        var i;
        var x = document.getElementsByClassName("city");
        for (i = 0; i < x.length; i++) {
            x[i].style.display = "none";
        }
        var activebtn = document.getElementsByClassName("testbtn");
        for (i = 0; i < x.length; i++) {
            activebtn[i].className = activebtn[i].className.replace(" w3-dark-grey", "");
        }
        document.getElementById(cityName).style.display = "block";
        evt.currentTarget.className += " w3-dark-grey";
    }

    var mybtn = document.getElementsByClassName("testbtn")[0];
    mybtn.click();

    // Accordions
    function myAccFunc(id) {
        var x = document.getElementById(id);
        if (x.className.indexOf("w3-show") == -1) {
            x.className += " w3-show";
        } else {
            x.className = x.className.replace(" w3-show", "");
        }
    }

    // Slideshows
    var slideIndex = 1;

    function plusDivs(n) {
        slideIndex = slideIndex + n;
        showDivs(slideIndex);
    }

    function showDivs(n) {
        var x = document.getElementsByClassName("mySlides");
        if (n > x.length) {slideIndex = 1}
        if (n < 1) {slideIndex = x.length} ;
        for (i = 0; i < x.length; i++) {
            x[i].style.display = "none";
        }
        x[slideIndex-1].style.display = "block";
    }

    showDivs(1);

    // Progress Bars
    function move() {
        var elem = document.getElementById("myBar");
        var width = 5;
        var id = setInterval(frame, 10);
        function frame() {
            if (width == 100) {
                clearInterval(id);
            } else {
                width++;
                elem.style.width = width + '%';
                elem.innerHTML = width * 1  + '%';
            }
        }
    }
</script>

</body>
</html>

